<?php
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$return['ischecklogin']=cfc('core')->checklogin('','',true);
if($_RQ['op']=='list'){
		$openid=$_RQ['openid']?:$_SESSION['openid'];
		$posterid=intval($_RQ['posterid'])?:intval($_RQ['id']);
		$goodsid=intval($_RQ['goodsid']);
		$type=$_RQ['type']?:1;
		if($type==3 && !$goodsid){
			$goodsid=pdo_getcolumn('jy_weishop_goods',array('image <>'=>'','uniacid'=>$_SESSION['uniacid']),'id');
		}
		$return=$this->get_active($type,$posterid,$goodsid,$openid);
		pdo_update('jy_poster_poster',array('times +='=>1),array('id'=>$return['id'],'uniacid'=>$_SESSION['uniacid']));
		$basic=$this->plugin_setting('basic');
        $return['member']['nickname']=$return['member']['nickname']?:'匿名';
		$img=$return['member']['avatar']?:$basic['share_image'];
		$img=tomedia($img);
		$return['sharedata']=array(
			'title'=>$return['member']['nickname'].'的《'.$return['title'].'》海报',
			'desc'=>$return['member']['nickname'].'的《'.$return['title'].'》海报,欢迎分享！！',
			'link'=>custom_url('jy_poster/build//openid='.$openid.'&fromuser='.$_SESSION['uid'].'&posterid='.$return['id'].'&goodsid='.$goodsid,true),
			'imgUrl'=>$img,
		);
		set_html('title',$return['member']['nickname'].'的《'.$return['title'].'》海报');
		exi($return);
}
?>